package com.temp.servlet;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.temp.model.UserBean;
import com.temp.utils.UserDaoImpl;


@WebServlet("/FIndAllServlet")
public class FIndAllServlet extends HttpServlet {

	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		
               
		   UserDaoImpl userDaoImpl =new UserDaoImpl();
		   List<UserBean> userBean=userDaoImpl.findAllLease();
		   request.setAttribute("userBean", userBean);
		   for (UserBean userBean2 :userBean) {
			   
			   System.out.println(""+userBean2.getId());
			   
		   }
		
		  
			   request.getRequestDispatcher("Leasemanage.jsp").forward(request, response);
	
		
	}

	
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
	
		doGet(request, response);
	}

}
